import Vue from 'vue'
import axios from "axios"
import Books from './Books.vue'
import VueResource from 'vue-resource'

Vue.config.productionTip = false
Vue.prototype.$axios = axios;
Vue.use(VueResource)

new Vue({
  el: '#app',
  data: {
    aquarium: {},
    program: {},
    categories: {
      aquarium: { 1: '鱼类', 2: '水草与造景', 3: '虾类', 4: '龟类' }, program: {
        1: '内功', 2: '外功', 3: '集合'
      }
    }
  },
  render: h => h(Books),
  mounted() {
    this.$axios.get("/static/data.json").then(function (res) {
      this.program = res.data.books.program;
      this.aquarium = res.data.books.aquarium;
    }.bind(this))
  },
})

